<template>
    <div id="setting_option">
        <h3>设备基本设置</h3>
        <el-form ref="form" :model="form" label-width="100px" style="max-width:800px">
            <el-form-item label="电源开关">
                <el-switch v-model="form.power"></el-switch>
            </el-form-item>
            <el-form-item label="童锁">
                <el-switch v-model="form.lock"></el-switch>
            </el-form-item>
            <el-form-item label="睡眠模式">
                <el-switch v-model="form.sleep"></el-switch>
            </el-form-item>
            <el-form-item label="编程开关">
                <el-switch v-model="form.programming"></el-switch>
            </el-form-item>
            <el-form-item label="风速模式">
                <el-radio-group v-model="form.wind_mode">
                    <el-radio label="手动"></el-radio>
                    <el-radio label="自动"></el-radio>
                </el-radio-group>
            </el-form-item>
            <el-form-item label="风速">
                <el-radio-group v-model="form.wind_speed">
                    <el-radio label="高"></el-radio>
                    <el-radio label="低"></el-radio>
                    <el-radio label="中"></el-radio>
                </el-radio-group>
            </el-form-item>
            <el-form-item label="工作模式">
                <el-radio-group v-model="form.work_mode">
                    <el-radio label="制冷"></el-radio>
                    <el-radio label="制热"></el-radio>
                </el-radio-group>
            </el-form-item>
            <el-form-item label="温度范围">
                <el-radio-group v-model="form.tmp_range">
                    <el-radio label="5-60度"></el-radio>
                    <el-radio label="6-90度"></el-radio>
                </el-radio-group>
            </el-form-item>
            <el-form-item label="温度单位">
                <el-radio-group v-model="form.tmp_unit">
                    <el-radio label="华氏"></el-radio>
                    <el-radio label="摄氏"></el-radio>
                </el-radio-group>
            </el-form-item>
            <el-form-item label="防冻开关">
                <el-switch v-model="form.antifree_switch"></el-switch>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="onSubmit">立即创建</el-button>
                <el-button>取消</el-button>
            </el-form-item>
        </el-form>
    </div>
</template>
<script>
export default {
    data() {
        return {
            form: {
                power: 1,
                lock: 0,
                sleep: 0,
                programming: 0,
                delivery: false,
                wind_mode: 1,
                wind_speed: 2,
                work_mode: 1,
                tmp_range: 1,
                tmp_unit: 1,
            }
        }
    },
    methods: {
        onSubmit() {
            console.log('submit!');
        }
    }
}
</script>
